package io.kiki.sba.registry.common.model.metaserver;

import io.kiki.sba.registry.common.model.Node;
import io.kiki.sba.registry.common.model.Node.NodeType;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.util.Map;


@Getter
public class NodeChangeResult<T extends Node> implements Serializable {

    private final NodeType nodeType;

    @Setter
    private Map<String /*dataCenter id*/, Map<String /*ipAddress*/, T>> nodes;

    @Setter
    private Long version;

    @Setter
    private Map<String /*dataCenter*/, Long /*version*/> dataCenterListVersions;


    @Setter
    private String localDataCenter;


    public NodeChangeResult(NodeType nodeType) {
        this.nodeType = nodeType;
    }


}
